package com.api.pay.model.domain;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @TableName api-order
 */
@TableName(value = "api_order")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ApiOrder implements Serializable {
    /**
     * 订单id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 订单编号
     */
    @TableField(value = "orderSn")
    private String orderSn;
    /**
     * 流水号
     */
    @TableField(value = "serialNumber")
    private String serialNumber;
    /**
     * 商品名称
     */
    @TableField(value = "goodsName")
    private String goodsName;
    /**
     * 商品编号
     */
    @TableField(value = "goodsId")
    private String goodsId;
    /**
     * 交易标题
     */
    @TableField(value = "subject")
    private String subject;

    /**
     * 购买用户id
     */
    @TableField(value = "userId")
    private Long userId;

    /**
     * 购买数量
     */
    @TableField(value = "count")
    private Integer count;

    /**
     * 价格
     */
    @TableField(value = "price")
    private BigDecimal price;

    /**
     * 创建时间
     */
    @TableField(value = "createTime")
    private Date createTime;

    /**
     *
     */
    @TableField(value = "updateTime")
    private Date updateTime;

    /**
     *
     */
    @TableLogic
    @TableField(value = "isDelete")
    private Integer isDelete;

    /**
     * 应付金额
     */
    @TableField(value = "totalAmount")
    private BigDecimal totalAmount;

    /**
     * 订单状态
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 收款码
     */
    @TableField(value = "qrCode")
    private String qrCode;


    /**
     * 支付方式
     */
    @TableField(value = "payMethod")
    private String payMethod;
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}